<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
    <title>Title</title>
    <base href="<%=basePath%>">
    <script type="application/javascript" src="js/jquery.js"></script>
    <link rel="stylesheet" type="text/css" href="css/order-css.css"/>
    <link rel="stylesheet" type="text/css" href="css/order-css1.css"/>
    <script type="application/javascript">
        function order() {
            var $parent = $(window.parent.document);
            var url = "${path}/orderAction!orderList";
            $parent.find("#frame").attr("src", url);
        }
    </script>
</head>
<body>
<div style="margin:0 auto;width:900px;margin-top: 10px">
    <div id="content">
        <div class="mainbox mine">
            <h2>
                订单详情
                <span class="op-area"><a onclick="order()">返回我的订单</a></span>
            </h2>
            <dl class="info-section primary-info J-primary-info">
                <dt>
                    <s:if test="order.state == 3">
                    <a class="apply-refund-link"
                       href="${path}/orderAction!cancleOrder?orderId=${order.orderId}">取消订单</a>
                    </s:if>

                     <s:if test="order.state == 4">
                    <a class="apply-refund-link"
                    href="${path}/orderAction!canclePayOrder?orderId=${order.orderId}">申请退款</a>
                    </s:if>


                    <span class="info-section--title">当前订单状态：</span>
                    <em class="info-section--text">
                        <s:if test="order.state == 0">
                            过期
                        </s:if>
                        <s:if test="order.state == 1">
                            待取消
                        </s:if>
                        <s:if test="order.state == 2">
                            已取消
                        </s:if>
                        <s:if test="order.state == 3">
                            未支付
                        </s:if>
                        <s:if test="order.state == 4">
                            已支付
                        </s:if>
                    </em>
                </dt>
                <dd class="last">
                </dd>
            </dl>
            <dl class="bunch-section J-coupon">
                <dt class="bunch-section__label">订单信息</dt>
                <dd class="bunch-section__content">
                    <ul class="flow-list">
                        <li>订单编号：${order.orderId}</li>
                        <li>下单时间:
                            <fmt:formatDate value="${order.createTime}"
                                            pattern="yyyy-MM-dd hh:mm"/></li>
                    </ul>
                </dd>
                <dd class="bunch-section__content">
                    <table cellspacing="0" cellpadding="0" border="0" class="info-table">
                        <tbody>
                        <tr>
                            <th class="left" width="100">酒店名称</th>
                            <th width="100">内容</th>
                            <th width="100">支付金额</th>
                        </tr>
                        <tr>
                            <td class="left">
                                ${order.hotelName}
                            </td>
                            <td>${order.orderContext}</td>
                            <td><span class="money">¥</span>${order.price}</td>
                        </tr>
                        </tbody>
                    </table>
                </dd>
            </dl>
        </div>
    </div>
</div>
</body>
</html>
